package com.cenntro.repair.common;

/**
 * 
* @ClassName: RepairEnum
* @Description: 维修状态
* @author Administrator
* @date 2019年7月10日
 */
public enum RepairEnum {
    CREATE(1, "报修"), ASSIGN(2, "系统指派"), REPAIRING(3, "开始维修"), 
    TRANSFER(4, "转派"), COMPLETE(5, "完成"), CANCEL(6, "撤销");

    /**
     * 类型名称
     */
    private String name;

    /**
     * 状态
     */
    private Integer status;

    private RepairEnum(Integer status, String name) {
        this.name = name;
        this.status = status;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public RepairEnum valueOf(Integer status) {
        for (RepairEnum re : RepairEnum.values()) {
            if (re.getStatus().equals(status)) {
                return re;
            }
        }
        return null;
    }
}
